export function getUuid () {
    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
        const r = Math.random() * 16 | 0
        const v = c === 'x' ? r : (r & 0x3 | 0x8)
        return v.toString(16)
    })
}

export function getSixUuid () {
    /** **默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1** **/
    const chars = '0123456789qwertyuiopasdfghjklzxcvbnm'
    const maxPos = chars.length
    let code = ''
    for (let i = 0; i < 6; i++) {
        code += chars.charAt(Math.floor(Math.random() * maxPos))
    }
    return code
}
